#1 计数
i = 0
while i <6:
    print(i)
    i += 1

i = 0
while True:
    if i == 101:
        break
    print(i)
    i += 1


#斐波那契数列


def fib(n)
    a, b = 1,1
    for i in range(n-1):
        a,b = b ,a+b
        return a


#第三题

class ParamsError (Exception):
    pass
def add(a, b):
    return a + b
def sub(a, b):
    return a - b
def mul(a, b):
    return a * b
def div(a, b):
    try:
        return a / b
    except ZeroDivisionError:
        raise ParamsError("分母不可以为0！")
    finally:
        return("function my_sub end")
def zc(a, b):
    try:
        return a // b
    except ZeroDivisionError:
        raise ParamsError("取整分母不可以为0！")
    finally:
        return("function my_sub end")

    return a // b
def qy(a, b):
    try:
        return a % b
    except ZeroDivisionError:
        raise ParamsError("取余分母不可以为0！")
    finally:
        return a % b
def kf(a):
    return a ** (1/2)
print("计算器")
choice = input ("输入运算选择：1，加法；2，减法；3，乘法；4，除法；5，整除；6，取余数；7，开方")
if choice == "1" :
        tmp = input("请输入你要计算的数字:")
        add(tmp)
elif choice == '2':
        tmp = input("请输入你要计算的数字:")
        sub(tmp)
elif choice == '3':
        tmp = input("请输入你要计算的数字:")
        mul(tmp)
elif choice == '4':
        tmp = input("请输入你要计算的数字:")
        div(tmp)
elif choice == '5':
        tmp = input("请输入你要计算的数字:")
        zc(tmp)
elif choice == '6':
        tmp = input("请输入你要计算的数字:")
        qy(tmp)
elif choice == '7':
        tmp = input("请输入你要计算的数字:")
        kf(tmp)
else:
        print("你输入的有误，请重新输入")